package com.mucd.chat.utils;

import com.ruoyi.common.core.domain.model.OnlineModel;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @author mucd
 */
public class SessionUtil {
    private static final Map<String, OnlineModel> SESSION =  new ConcurrentHashMap<>();

    public static void put(String key, OnlineModel value){
        SESSION.put(key, value);
    }

    public static OnlineModel get(String key){
        return SESSION.getOrDefault(key, null);
    }
}
